<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>更改区域主管</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/css/select2.min.css"
          rel="stylesheet"/>

    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/js/select2.min.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/global.js" type="text/javascript"></script>
	<style>
		.lt{float:left}
		.form-group{overflow:hidden;}
		.form-group label{width:25\9%;*+width:20%;text-align:right\9;*+text-align:right;}
		.form-group .col-sm-8{width:66%\9;*+width:66%;}
		.form-group .form-control{*+width:95%;}
	</style>
</head>
<body>
<div class="col-sm-12">
    <form class="form-horizontal m-t" id="form" method="post"
          action="${pageContext.request.contextPath}/admin/tagent_editRegion.action">
        	<div class="form-group">
	            <label class="col-sm-3 col-sm-3 control-label lt"><i class="require"></i>公司名称:</label>
		        <div class="col-sm-8 lt">
		           <input class="form-control" size="30" value="${agtName}" disabled="disabled"/>
		        </div>
            </div>
        	<div class="form-group">
	            <label class="col-sm-3 col-sm-3 control-label lt"><i class="require"></i>区域主管:</label>
		        <div class="col-sm-8 lt">
		            <select name="sysoptId" id="sysoptId"></select>
		        </div>
            </div>
            <input type="hidden" name="sid" value="${sid}"/>
        	<input type="hidden" name="status" value="${status}"/>
    </form>
</div>
<script type="text/javascript">
$(function () {
    $.post("${pageContext.request.contextPath}/admin/sysopt_list.action",{
        "type":"area"},function (data) {
    	$("#sysoptId").empty();
        $("#sysoptId").append("<option value=''>请选择区域主管</option>");
        for (var i = 0; i < data.length; i++) {
            $("#sysoptId").append("<option value='" + data[i].sid + "'>" + data[i].uname + "</option>");
        }
        $("#sysoptId  option[value='${sysoptId}'] ").attr("selected", true); 
        $("#sysoptId").select2({
            "placeholder": "请选择区域主管",
            "width": "100%"
        })
    }, "json");

})
</script>
</body>
</html>
